

#include "render/RendererAPI.h"

#include "render/Texture.h"
#include "render/OpenGL/OpenGLTexture.h"

namespace Cogs {
	std::shared_ptr<Texture2D> Texture2D::Load(const std::string& path) {
		switch (RendererAPI::GetAPIType()) {
			case RendererAPIType::OpenGL: return std::make_shared<OpenGLTexture2D>(path);
			case RendererAPIType::None: {
				__debugbreak(); 
				return nullptr;
			}
			default:return nullptr;
		}
	}

	std::shared_ptr<Texture2D> Texture2D::Create(uint32_t width, uint32_t height) {
		switch (RendererAPI::GetAPIType()) {
			case RendererAPIType::OpenGL: return std::make_shared<OpenGLTexture2D>(width, height);
			case RendererAPIType::None: {
				__debugbreak();
				return nullptr;
			}
			default:return nullptr;
		}
	}
}